]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
LookingGlass: Correct timeout usage
authorBastien Nocera <hadess@hadess.net>
Thu, 10 Apr 2014 19:08:49 +0000 (21:08 +0200)
committerBastien Nocera <hadess@hadess.net>
Thu, 10 Apr 2014 19:08:49 +0000 (21:08 +0200)
Calling Mainloop.source_remove() on the timeout ID will not reset it,
and we're already removing the timeout by returning GLib.SOURCE_REMOVE
in the callback.

js/ui/lookingGlass.js

index 2dccc99294807f69f4aef78133933806ce5d4e42..a39d713a7492286ba4bbc0e0d1267110875ed077 100644 (file)
@@ -843,7 +843,7 @@ const LookingGlass = new Lang.Class({
            System.gc();
            this._timeoutId = Mainloop.timeout_add(500, Lang.bind(this, function () {
                 gcIcon.icon_name = 'gnome-fs-trash-full';
-                Mainloop.source_remove(this._timeoutId);
+                this._timeoutId = 0;
                 return GLib.SOURCE_REMOVE;
            }));
            GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'gnome-fs-trash-full\'');